The purpose of this document is to provide the formulas and links to create plug-ins for Escape Velocity or Override using ResEdit and the EV Bible by Matt Burch. The EV Bible can be found at:
ftp://ftp.AmbrosiaSw.com/beta/EV_Bible.hqx
http://www.escape-velocity.com/
You can find different ways to define these formulas, this document only contains our way!
As usual, this document is provided as is, without any expressed or implied warranties. While every effort has been taken to ensure the accuracy of the information contained in this document, the authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.
Besides, if you are just starting to edit and create an EV plug, it would be a good idea to read first the EV Plug-in FAQ.generic by "Cajun" David Richard
Be sure you have copied the 'TMPL' resources for ResEdit in your plug-in or in the ResEdit Preferences file! These resources are provided with the EV Bible.
Note: some EV templates are defined as rectangles. So don't be surprised if ResEdit displays sometimes an error message talking about "Invalid rectangle...". This error is not a problem for EV: just hit 'Yes', several times if necessary.
FORMULAS FOR A NEW SHIP
• Create a 'ship' resource:
154 ≤ id#NewShip ≤ 190
Override : 175 ≤ id#NewShip ≤ 190
• Calculate the 'position' of your new ship like this:
posShip = id#NewShip - 128
• Create 6 'PICT' resources:
1. a 36 sprite frame grid (width and height must be a multiple of 8)
1050 ≤ id#ShipSprites ≤ 1998 (should be an even number).
Or in a safer way (EV only): id#ShipSprites = posShip*2 + 998
2. its corresponding mask (ie a picture where all parts of the ship are white and the background black)
id#ShipMask = id#ShipSprites + 1
3. a Target Display PICT: 128 x 64 pixels
id#TargetPICT = 3000 + posShip
4. a ShipYard Selection PICT (shown when the player selects this ship): 100 x 100 pixels
id#ShipYardPICT = 5000 + posShip
5. a ShipYard thumbnail (which is a version of the ShipyardPict that's been scaled to 32 x 32 pixels)
id#ThumbnailPICT = 5101 + posShip
6. a Communication Dialog PICT: 100 x 100 pixels
idCommPICT = 5300 + posShip
• Create a 'spin' resource which contains the ids of your Sprite and Mask PICTs:
id#ShipSpin = id#NewShip
Then, enter the id#ShipSprite and id#ShipMask values in the corresponding fields of this 'spin' resource.
• Create 4 'STR ' resources:
1. Ship's name: a short version of the ship's name (15 characters max like "Shuttlecraft", "Confed Gunboat", "Bulk Freighter"...)
id#ShipShortName = 3600 + posShip
2. Ship's long name (appears in a dialog when the ship is bought: ex. "Rendelli StarDrive 805R cargo shuttle")
id#ShipFullName = 3700 + posShip
3. Ship's shortened name for communication display (keep this at 14
characters, ok? Remove all government stuff and most classifications, "Confed Gunboat" becomes "Gunboat", "Luxury Liner" becomes "Liner", "Light
Freighter" becomes "Lt. Freighter" and "Escort Carrier" becomes "Carrier").
id#ShipCommName = 3800 + posShip
4. Independent ship's name (if your ship can be owned by any government). Keep this even shorter, do as with the above and remove even more "Lt.Freighter" becomes "Freighter". This must be a lone word!
id#IndependentShipName = 3900 + posShip
• Create 2 'desc' resources:
1. Ship's description when the ship is bought
id#ShipBuyDesc = 2000 + posShip
2. Ship's description (shown in the Bar when the player is offered to hire the ship as an escort)
id#ShipHireDesc = 2100 + posShip
FORMULAS FOR A NEW OUTFIT
• Create a 'outf' resource:
182 ≤ id#NewOutf ≤ 255
Override : 202 ≤ id#NewOutf ≤ 255
• Calculate the 'position' of your new outfit like this:
posOutf = id#YourNewOutf - 128
• Create 2 'PICT' resources:
1. a normal PICT of the item (shown when the player selects this item in the Outfit Section): 100 x 100 pixels
id#SelectOuftPICT = 6000 + posOutf
2. an Outfit Section Selection PICT (or thumbnail) which a is reduced view of the above: 32 x 32 pixels
id#OuftThumbnail = 6101 + posOutf
• Create 3 'STR ' resources:
1. The name of the outfit (keep this ≤ 15 or Hector'll mess you up!)
id#OutfName = 3000 + posOutf
2. Lowercase Outfit's name (the same as above but in lowercase)
id#OutfLCName = 3200 + posOutf
3. Plural outfit name (lowercase, plural and ≤ 20 characters.
id#OutfPlural = 3400 + posOutf
• Create 1 'desc' resource:
Outfit's description (displayed when the player selects this item in the Outfit Section)
id#OutfDesc = 3000 + posOutf
Note: if this new outfit is a weapon, see below.
FORMULAS FOR A NEW WEAPON
• Create a new 'weap' resource:
153 ≤ id#NewWeapon ≤ 190
Override : 163 ≤ id#NewWeapon ≤ 190
Then, enter the id#NewWeapon value in the 'ModVal' field of the linked outfit.
• Calculate the 'position' of your new weapon like this:
posWeap = id#NewWeapon - 128
• If your weapon sends projectile (bolts, bullets, darts, missiles...), you will need to create:
2 'PICT' resources:
1. a 36 sprite frame grid (width and height must be a multiple of 8)
232 ≤ id#ProjectileSprites ≤ 398 (should be an even number)
Or in a safer way (EV only): id#ProjectileSprites = posWeap*2 + 182
2. its corresponding mask
id#ProjectileMask = id#ProjectileSprites + 1
1 'spin' resource:
214 ≤ id#WeapSpin ≤ 262
Or in a safer way (EV only): id#WeapSpin = posWeap + 189
Then, enter the id#ProjectileSprites and id#ProjectileSprites values in the corresponding fields of this 'spin' resource.
Also enter the result of (id#WeapSpin - 200) in the 'Graphic' field of the 'weap' resource.
• If you want to play a new sound when this weapon is used:
Paste a new sound ('snd ' resource) formatted to 8 bits at 11.127 kHz without compression.
218 ≤ id#Sound ≤ 263 AND id#Sound ≠ 223
Then, enter the result of (id#Sound - 200 ) in the 'Sound' field of the 'weap' resource.
FORMULAS FOR A NEW SYSTEM
• Create a 'syst' resource:
236 ≤ id#NewSystem ≤ 1028
Override : 439 ≤ id#NewSystem ≤ 1028
Of course, you will have to link this new system with others (OK! You don't have to, but you do want people to see your work, right?):
Enter the id# of the linked systems in the 'Con1' to 'Con4' and 'Con6' to 'Con16' fields of the new system (don't use more than 7 links, pleeeaaase!). If your system is to be linked with a system that came with EV, make a copy of that system and put it in your plug.
Enter the id#NewSystem value into a 'ConX' field in each of the systems your new system if linked to.
• If you want a message to be displayed each time the player enters this new system (this message is displayed at the bottom of the screen, like in Ruby):
1. Enter an integer between 2 and 1500 in the 'Message' field of your new system. May be it would be a good idea to set this value to
MsgNumber = id#NewSystem - 128
2. Create a 'STR ' resource as:
id#SystemMsgStr = 999 + MsgNumber
FORMULAS FOR A NEW SPOB (space object: planet or station)
• Create a 'spob' resource:
235 ≤ id#NewSpob ≤ 1627
Override : 405 ≤ id#NewSpob ≤ 1627
NOTE: If you plan to have a new graphic for this spob, it's better to define its ID like this (EV only):
EV only : 235 ≤ id#NewSpob ≤ 264
Enter the id#NewSpob value in the 'Nav1' to 'Nav4' fields of the system where the spob is located.
• Calculate the 'position' of your new spob like this:
posSpob = id#NewSpob - 128
• Create a 'desc' resource:
id#SpobDesc = id#NewSpob
• If you want a new picture to be displayed when the player lands on this planet:
1. Create a 'PICT' resource (333 x 271 pixels):
id#LandPICT = 11000 + (id#NewSpob - 128)
2. Enter the id#LandPICT value in the 'CustPicID' field of the 'spob' resource.
• If you want a new sound to be played when the player lands on this planet:
1. Paste a new sound ('snd ' resource) formatted to 8 bits at 11.127 kHz without compression.
10003 ≤ id#LandSound
2. Enter the id#LandSound value in the 'CustSndID' field of the 'spob' resource.
• If your planet has a bar:
Create a 'desc' resource:
id#BarDesc = 10000 + (id#NewSpob - 128)
• If you want to have a new graphic for your spob:
Create 2 'PICT' resources:
1. a PICT for the spob.
If your spob is a big planet, use a 80 x 75 pixels graphic. For a station, use a 48 x 48 pixels graphic. If it is a moon, use a 24 x 24 pixels graphic (note that these dimensions are not compulsory, just standard!).
2066 ≤ id#SpobSprite ≤ 2998
Or in a safer way (EV only): id#SpobSprite = posSpob*2 + 1852
2. a corresponding mask.
id#SpobMask = id#SpobSprite + 1
Create 1 'spin' resource:
336 ≤ id#SpinSpob ≤ 363
Or in a safer way (EV only): id#SpinSpob = posSpob + 237
Enter the id#SpobSprite and id#SpobMask values in the corresponding fields of this 'spin' resource. Then, enter the value of id#SpinSpob - 300 into the 'Type' field in the 'spob' resource.
Create a 'STR ' resource:
id#SpobStr = id#SpinSpob + 6700
This 'STR ' resource contains a string that defines the spob's type. Something like "Class M planet". See appendix II for more information about stellar types.
FORMULAS FOR A NEW GOVERNMENT
• Create 1 'govt' resource:
154 ≤ id#NewGovt ≤ 255
Override : 177 ≤ id#NewGovt ≤ 255
• Calculate the 'position' of your new government :
posGovt = id#NewGovt - 128
• Create 2 'STR ' resources:
1. Shortened (8 characters are max) goverment's name for target display (transponder code):
id#Transponder = 4000 + posGovt
2. Goverment's name for communication dialog (Matt Burch uses a max of 9 characters but it should be OK to use 10):
id#CommNameGovt = 4200 + posGovt
Then, enter the id#NewGovt value in:
1. The 'Govt' field of all the 'syst' resources owned by this new government.
2. The 'InherentGovt' field of all 'ship' resources that are owned only by this government (ex. 'Confed' for gunboats).
• Now, if you want your new government to have specific greetings for Comm dialog:
(so the ships will respond particular sentences when you communicate with them)
Create 10 'STR ' resources numbered like this:
id#STRcomm1 = (posGovt * 10) + 10010
id#STRcomm2 = (posGovt * 10) + 10011
id#STRcomm3 = (posGovt * 10) + 10012 etc...
The first five STRs will be used for ships with an AI of 1 or 2 (traders and freighters that is). The other five will be used for AIs 3 & 4 (fighters and warships).
FORMULAS FOR A NEW NEBULA
• Create 1 'nebu' resource:
130 ≤ id#NewNebu ≤ 131
Override : id#NewNebu = 131
• Calculate the 'position' of your new nebula like this:
posNebu = id#NewNebu - 128
• Create 3 'PICT' resources (for the Map-zooming):
1. a PICT of the nebula with an even width and height (normal zoom):
id#PICTNebuNormal = 9501 + (3 * posNebu)
2. a PICT of the nebula twice the size of the normal (zoom in):
id#PICTNebuBig = 9502 + (3 * posNebu)
3. a PICT of the nebula half the size of the normal (zoom out):
id#PICTNebuSmall = 9500 + (3 * posNebu)
Then, enter the width and height size of the normal PICT into their respective fields XSize and YSize.
Also enter the x and y coordinates of the top left of the nebula into their respective fields XPos and YPos.
It is best if you leave half an inch or so of black space around the nebula. Not only will this make cropping easier but the nebula will also be spotted sligthly before you enter it.
Don't forget to write the name of the nebula (or whatever it is) on the graphics.
FORMULAS FOR A NEW PERSONALITY
• Create 1 'pers' resource:
346 ≤ id#pers ≤ 637
• If you want your new personality to have a new comm quote
(so this personality will respond a new sentence when you communicate with him):
Create 1 'STR ' resource:
12001 ≤ id#StrComm ≤ 12511
Enter the value of (id#StrComm - 12000) into the "CommQuote" field of the new 'pers' resource.
If you don't create this new 'STR ' resource, you can fill the "CommQuote" field with an index number of a standard entry in 'STR#' resource 7100 (see EV Bible).
• If you want your new personality to have a specific hail quote
(so this personality will send a particular message at the bottom of the screen (i.e. over the radio):
Create 1 'STR ' resource:
5000 ≤ id#StrHail ≤ 5511
Enter the value of (id#StrHail - 4999) into the "HailQuote" field of the new 'pers' resource.
If you don't create this new 'STR ' resource, you can fill the "HailQuote" field with an index number of a standard entry in 'STR#' resource 7101 (see EV Bible).
FORMULAS FOR A NEW CARGO TYPE (for missions)
• Create 3 'STR ' resources:
1. Generic cargo name :
9024 ≤ id#CargoName ≤ 9063
2. Lowercase cargo name (19 characters are the maximum if the cargo can be taken from a ship when boarding, otherwise 21):
id#LCCargo = id#CargoName + 100
3. Cargo abbreviation for status display (very short string, 8 characters are max):
id#AbbrevCargo = id#CargoName + 200
FORMULA FOR A NEW JUNK
• Create a 'junk' resource:
147 ≤ id#NewJunk ≤ 192
• Create 2 'STR ' resources:
1. An abbreviated version of the junk name. Max 8 characters.
id#ShortJunk = 7872 + id#NewJunk
2. A lowercase version of the junk name.
id#LCJunk = 8072 + id#NewJunk
The commodity will be sold at a 20% discount on the sold at spob and at a price increase of 25% at the bought at spob.
APPENDIX I: Hex Strings
Example for a new space object:
New spob characteristics Value provided by the EV Bible
Can lan/dock here 00000001
Has commodity exchange 00000002
Can outfit ship here 00000004
Can buy ships here 00000008
Stellar is a station 00000010
Low industrial prices 01000000
High medical prices 00400000
Now, add the numbers in the corresponding columns (like in normal addition) but when the result of a column is greater than 9, replace this result by the following characters:
10 = A 11 = B 12 = C 13 = D 14 = E 15 = F
So, in your example, we have now: 0140001F
Remember that any single column has a maximum value of 15, not 9. If you find a value greater than 15, check your characteristics!
APPENDIX II: Spob types
M = Mixture? If your planet has about the same amount of land and water.
W = Water. If your planet has more water than land.
K = ???? If the world is dominated by land.
D = Desert. If your planet is totaly dominated by land and is supposed to be very hot, or Dead if your planet is just a HUGE rock
F = Frozen. If your planet is covered with ice.
T = ???? If your planet is one of those purple-green things.
G = Gas. If your planet is like Clotho II. Can be red, green and blue.
E = No idea. If your planet is really hot or just plain red.
R = Ring. If there are one or several rings around your planet.
Moons are treated the same way. You just write "(Class X moon)" instead.
Stations are treated a bit different. You write "(Type Y station)" and Y has to be a number. Matt Burch's already used 1-4 so it would be logical to make your station a type 5, right?
ACKNOWLEDGMENT
Great thanks to Pontus Ilbring for his advice and participation.
Thanks to Jim Byer to show us some mistakes.
Feel free to send your comments, error reports or congratulations (why not?) to: